import common from './modules/common'
import students from './modules/students'
import tutors from './modules/tutors'

import VueRouter from 'vue-router'
import Vue from 'vue'


Vue.use(VueRouter)

const routes = [
  ...common,
  ...students,
  ...tutors
]
const router = new VueRouter({
  mode: 'history',
  routes:routes
})
// 解决路由重复的报错。该报错不影响运行，只是解决飘红
const originalPush = VueRouter.prototype.push
   VueRouter.prototype.push = function push(location) {
   return originalPush.call(this, location).catch(err => err)
}
export default router